use super::utils::STRING;

/**列数据 */
#[derive(Debug, Default)]
pub struct ColumnData {
    pub title: String,
    pub comment: String,
    pub low_type: String,
    pub true_type: u8,
    pub datas: Vec<String>,
}

impl ColumnData {
    pub fn new() -> ColumnData {
        ColumnData {
            title: String::new(),
            comment: String::new(),
            low_type: String::from("nuil"),
            true_type: STRING,
            datas: Vec::new(),
        }
    }

    pub fn is_valid(&self) -> bool {
        if self.title.is_empty() || self.low_type.is_empty() || self.low_type == "nuil" {
            return false;
        }
        true
    }
}
